how to compare time strings in c#

115

how to compare time strings in c# -

var value = "00:00:15:185";    

    if (DateTime.ParseExact(value, "HH:mm:ss:fff", CultureInfo.InvariantCulture) > 
        DateTime.ParseExact("00:00:15:000", "HH:mm:ss:fff", CultureInfo.InvariantCulture))
    {
        // logic here.  
    }

Comments

Submit
0 Comments